

import 'package:flutter/material.dart';
import 'package:gczn_hd/app/core/values/app_colors.dart';
import 'package:gczn_hd/app/core/values/text_styles.dart';

class GcznCheckbox extends StatelessWidget{
  final bool value;
  final String? groupValue;
  final String label;
  final Color? activeColor;
  final ValueChanged<Map<String, dynamic>> onChanged;

  GcznCheckbox({
    required this.value,
    required this.label,
    required this.onChanged,
    this.activeColor = AppColors.gcznPrimaryBlueColor,
    this.groupValue,
  });


  @override
  Widget build(BuildContext context) {
    return Row(
      mainAxisSize: MainAxisSize.min,
      children: [
        Checkbox(value: value, activeColor: activeColor, onChanged: (v){
          onChanged({"label": label, "value": v});
        },),
        Text(label, style: textStyle,)
      ],
    );
  }

}